﻿using System.Collections;
using System.ComponentModel.Design;
using Raider.WinForms.Actions.Standard;

namespace Raider.WinForms.Actions.Design
{
    public class ActionDesigner : ComponentDesigner
    {
        protected override void PostFilterProperties(IDictionary properties)
        {
            base.PostFilterProperties(properties);

            var filter = HidePropertyAttribute.GetHiddenProperties(Component.GetType());
            foreach (var prop in filter)
            {
                properties.Remove(prop);
            }
        }

        protected override void PostFilterEvents(IDictionary events)
        {
            base.PostFilterEvents(events);

            var filter = HideEventAttribute.GetHiddenEvents(Component.GetType());
            foreach (var @event in filter)
            {
                events.Remove(@event);
            }
        }
    }
}
